x=x=x=x=x=x=x=x==vonsmith==x=x=x=x=x=x=x=x=x

OVERVIEW:
This code has been tested on the Hal Beta version 5.0.28 engine. This code has been run on a Windows 2000, 1.8GHz, 512MB laptop and a Windows XP, 2.8GHz, 512MB desktop with response times of about 2 seconds or less. Slower computers may take longer to respond to user input.

This code is experimental code and is not guaranteed in any way, either expressed or implied. Use it at your own discretion.


WHAT IT DOES:
This code replaces the original "RESPOND: ATTRIBUTES OF HAL" code entirely in the Ultra Hal v5.0.28 Beta. This function has been entirely rewritten by =vonsmith= , as version 10-10-03a. This code allows Hal to respond to the user's comments about Hal. Examples of supported types of user inputs are shown at the bottom of this file.

The "Xassoc_adjective.brn" is a list of adjectives. Please note that not all words in "Xassoc_adjective.brn" are strictly adjectives in a technical sense. Adjective is used here in a very loose sense.

You can add new adjectives and nouns to the list files, but beware. The one note of CAUTION is that the same word MUST NOT appear in both lists. This code will not give proper responses if you do. In English it is common for a word to act as a noun or as an adjective. Example: BLUE, You are feeling blue or you have a blue car. This will "confuse" Hal.

The same word MUST NOT appear in both of these files:

Xassoc_adjective.brn   <---  Adjective list
Xassoc_MyWords.brn   <---  Noun list

If you want to add a word then decide if the word will better serve as a noun or adjective and place it in the proper file. As always make sure to strictly maintain the organizational format of the files.


SOME SENTENCE EXAMPLES:
Examples of user input this function can handle:
Up to 4 adjectives prior to the noun and 3 after "sense of" are supported.

User's input of regular "Your" type sentences. Hal sees them as "My" type sentences.
 Your pretty eyes are nice.
 Your deep blue eyes are nice.
 Your big red truck is cool.
 Your interesting gray matter is smart.
 Your huge deep blue crossed eyes are goofy. <--- Up to 4 detected adjectives supported.

"Sense of" 'something' sentences that this function can respond to:
 Your sense of adventure is exciting.
 Your sense of high adventure is odd.
 Your huge sense of high adventure is disliked.
 Your sense of urgency is great.
 I respect your incredible sense of urgency.
 Your sense of humor is strange.
 Your peculiar sense of odd unusual humor is strange.
 Your amazing sense of hearing in sharp.
 Your sense of adventure is liked.

And yet not confused by these user inputs:
 Your senses are sharp.
 Your amazing sense of hearing is sharp.
 What happened to your common sense?


INSTALLATION:
Back up your existing Hal files before installing these new files.

Copy and paste the code in the "RESPOND, ATTRIBUTES OF HAL, Improved.txt" file into the Hal v5.0 Beta file "hal5.uhp". Replace the existing code for the "RESPOND: ATTRIBUTES OF HAL" function. When you are done pasting, the new code in this package should be immediately preceded by the "RESPOND: YES/NO QUESTION ABOUT HAL" function and immediately followed by the "RESPOND: ATTRIBUTES OF USER" function.

The following .brn files need to be placed in the "DefBrain" directory with the rest of the .brn files. No new .brn files are replacing original files.

The .brn files needed to run are: 
Xaboutme0.brn   <---  (Sentences for 0 adjectives)
Xaboutme1.brn   <---  (Sentences for 1 adjectives)
Xaboutme2.brn   <---  (Sentences for 2 adjectives)
Xaboutme3.brn   <---  (Sentences for 3 adjectives)
Xaboutme4.brn   <---  (Sentences for 4 adjectives)
Xassoc_adjective.brn   <---  (Adjective list, strictly speaking some words are not adjectives)
Xassoc_MyWords.brn   <---  (Noun list)

CONCLUSION:
Have fun with this new code. I plan to add code for Hal's emotional context to further improve the quality of "My" type responses. Also forgive me for some of the goofy sentences in the .brn files. Some I thought up off the top of my head, the others are derived from the original Hal files. I'll probably improve the sentences at the same time I add the emotional context code.

Have fun... = vonsmith =

